<{include file="header.html"}>
	<script type="text/javascript" src="../include/ajaxfileupload1.0/jquery.js"></script>
	<script type="text/javascript" src="../include/ajaxfileupload1.0/ajaxfileupload.js"></script>
	<script type="text/javascript">
	function ajaxFileUpload()
	{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'do_category_picupload.php',
				secureuri:false,
				fileElementId:'fileToUpload',
				dataType: 'json',
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							//alert(data.msg);
							//alert("http://127.0.0.1:8080/luxmotor/userfiles/category/" + data.msg);
							document.getElementById("picdone").src = "../userfiles/category/" + data.msg;
							document.getElementById("hidden_pic").value = data.msg;
						}
					}
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		
		return false;

	}
	</script>	


       	<div id="Layer">您的位置是：新增產品分類</div>
        <div id="Time"> </div>
       
        <!-- 內容區 Start-->
       
 <div id="tab">
        	<div class="title">&middot; 新增產品分類</div>
            <div class="btn2">
<!--           
            <input name='button3' type='submit' class='button3' id='button3' onclick="location.href='news_add.php'" value='新增最新消息' />
-->
            </div>

<table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>
   
    <th width="15%">項目</th>
	<th width="85%">內容</th>
    
  </tr>

     <tr class="tr" onmouseover="this.className='trover'" onmouseout="this.className='tr'" >
   <td>
   類別照片
   </td>
    <td>
		<p align="left">
			<img id="loading" src="../include/ajaxfileupload1.0/loading.gif" style="display:none;">
			<img id="picdone" src="../include/ajaxfileupload1.0/no-images.jpeg" >
			<form name="form" action="" method="POST" enctype="multipart/form-data">
			<p align="left">
				<input id="fileToUpload" type="file" size="45" name="fileToUpload" class="input">
				<button class="button" id="buttonUpload" onclick="return ajaxFileUpload();">Upload</button>圖片上傳後，記得按送出。圖片大小 116 x 153
				</p>
			</form>   
		</p>
	</td>

  </tr>
<form action="product.php?op=1" method="post">  
   <tr class="tr" onmouseover="this.className='trover'" onmouseout="this.className='tr'" >
   <td>
   名稱
   </td>
    <td>
		<p align="left">
			<input name="subject" type="text" id="subject" size="50" maxlength="60" />
			<input name="hidden_pic" type="hidden" id="hidden_pic" size="50" maxlength="255" />
		</p>
	</td>

  </tr>
   <tr class="tr" onmouseover="this.className='trover'" onmouseout="this.className='tr'" >
   <td>
   排序
   </td>
    <td>
		<p align="left">
			<input name="order" type="text" id="order" size="10" maxlength="10" />
		</p>
	</td>

  </tr>  


  <tr class="tr" onmouseover="this.className='trover'" onmouseout="this.className='tr'" >
   <td>
   內容
   </td>
    <td>
		<p align="left">
			<textarea class="" cols="80" id="editor1" name="editor1" rows="10"></textarea>
		</p>
	</td>

  </tr>

  <tr>

    <th class="tabfooter" colspan="6" style="border-left:0px;"> 
      
		<input type="submit" value="送出" title="送出" />
 
    </th>
    </tr>
	</form>  
</table>

<{include file="footer.html"}>